package com.ny.zmb.openapi.jh.from;

import com.ny.zmb.openapi.jh.vo.OrderProductReqVO;
import com.ny.zmb.openapi.ysutil.annotation.Length;
import com.ny.zmb.openapi.ysutil.annotation.NotBlank;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;



import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class JHSubOrderFrom implements Serializable {
    //第三方的订单单号，必须在 100 字符以内
    @NotBlank
    private String thirdOrder;
    //产品组,最多支持 50 种商品
    @Length(groups = List.class , max = 50)
    @NotBlank
    private List<OrderProductReqVO> prodGroup;
    //收货人姓名，最多 20 个字符
    @Length(max = 20)
    @NotBlank
    private String name;
    //区划代码,传入最后一级的地址编码，如果是 4 级就传 4 级编码，3 级就传 3 级编码，二级和一级不支持
    @NotBlank
    private int regionCode;
    //收货人详细地址，最多 100 个字符
    @NotBlank
    @Length(max = 100)
    private String address;
    //手机号，最多 20 个字符
    @NotBlank(message = "手机号不能为空")
    @Length(max = 20)
    private String mobile;
    //备注（少于 100 字）
    @Length(max = 100)
    private String remark;
    //总运费
    private BigDecimal freight;
    //订单编号
    private String orderNoThird;


}
